﻿using System;
using Glue.Converters;

namespace GlueTests.BaseConverterTests
{
    internal class TestConverterBetweenStringAndInt:BaseConverter<String,int>
    {
        private bool mapTowardsRightHasBeenCalled;

        public override int MapTowardsRight(string from, int to)
        {
            mapTowardsRightHasBeenCalled = true;
            return Convert.ToInt32(from);
        }

        public override string MapTowardsLeft(int from, string to)
        {
            return Convert.ToString(from);
        }

        public bool MapTowardsRightHasBeenCalled()
        {
            return mapTowardsRightHasBeenCalled;
        }
    }
}
